package com.zzyy.study.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Value;

import java.io.Serializable;

/**
 * 用户表
 * @TableName student
 */
@TableName(value ="student")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student implements Serializable {
    /**
     * 用户id
     */
    @TableId(value="id",type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 用户名
     */
    @TableField("name")
    private String name;

    /**
     * 年龄
     */
    @TableField("age")
    private Integer age;

    public Student(String name, Integer age)
    {
        this.name = name;
        this.age = age;
    }
}

